# Makefile.in for kernel module

SHELL = /bin/sh
INSTALL = @INSTALL@
mkdir_p = mkdir -p
VERSION = @PACKAGE_VERSION@

DISTFILES = Makefile.in configure.ac configure ../install-sh \
	xio_log.h  xio_mem.h  xio_os.h \
	../../common/common/xio_observer.h \
	io_context.c xio_ev_loop.c \
	xio_init.c xio_mem.c xio_task.c xio_kernel_utils.c \
	xio_schedwork.c \
	../../common/xio_conn.c \
	../../common/xio_conns_store.c \
	../../common/xio_options.c \
	../../common/xio_session.c \
	../../common/xio_sessions_server.c	\
	../../common/xio_sessions_client.c	\
	../../common/xio_transport.c \
	../../common/xio_connection.c \
	../../common/xio_error.c \
	../../common/xio_server.c \
	../../common/xio_sessions_store.c \
	../../common/xio_observer.c \
	../../common/xio_utils.c \

xiomoduledir = @kmoduledir@/drivers/infiniband/ulp/xio

xiomodule := xio.ko

all: all-@ENABLE_XIO_MODULE@
install: install-@ENABLE_XIO_MODULE@
uninstall: uninstall-@ENABLE_XIO_MODULE@

all-n:
install-n:
uninstall-n:

all-y: all-spec

install-y: all
	$(mkdir_p) $(DESTDIR)$(xiomoduledir)
	$(INSTALL) -m 644 $(xiomodule) $(DESTDIR)$(xiomoduledir)/$(xiomodule)
	-/sbin/depmod -a

uninstall-y:
	rm -f $(DESTDIR)$(xiomoduledir)/$(xiomodule)
	-/sbin/depmod -a

clean:
	-rm -f $(xiomodule) *.o .*.cmd *.mod.c *.ko *.s */*.o *.order *.symvers *.unsigned ../../common/.*.cmd

distclean: clean
	rm -f Makefile configure config.status
	rm -f config.h config.log config.status config.cache
	rm -rf .tmp_versions autom4te.cache

maintainer-clean: distclean

distdir: $(DISTFILES)
	cp -p $(DISTFILES) $(distdir)


ccflags-y += -I$(SUBDIRS) -I$(SUBDIRS)/.. -I$(SUBDIRS)/../../common -I$(SUBDIRS)/../../common -I$(SUBDIRS)/../../../include
obj-m := xio.o
xio-objs := \
	xio_init.o \
	xio_context.o \
	xio_ev_loop.o \
	xio_init.o \
	xio_mem.o \
	xio_task.o \
	xio_kernel_utils.o \
	xio_schedwork.o \
	../../common/xio_conn.o \
	../../common/xio_conns_store.o \
	../../common/xio_options.o \
	../../common/xio_session.o \
	../../common/xio_session_server.o	\
	../../common/xio_session_client.o	\
	../../common/xio_transport.o \
	../../common/xio_connection.o \
	../../common/xio_error.o \
	../../common/xio_server.o \
	../../common/xio_sessions_store.o \
	../../common/xio_observer.o \
	../../common/xio_utils.o

all-spec:
	$(MAKE) -C @kernelsrc@ SUBDIRS=`pwd` @KERNELMAKE_PARAMS@ modules
